VideoHelp Forum




+ Reply to Thread
Results 1 to 3 of 3
  1. Member
    Join Date
    Feb 2008
    Location
    United States
    Search Comp PM
    GFD 1.04.5, muxman, titlesets, Advanced Mode.

    I'm using the <pre> from this thread to "remember" the button highlight for which titleset was played...
    https://forum.videohelp.com/topic310993-30.html#1626047
    ... but of course it doesn't work when jumping back from a submenu to the "parent" submenu that called it.

    I have a mainmenu with four buttons, each jumping to a submenu. One of those submenus also has four of its own buttons that jump to different submenus, like so:

    mainmenu
    • mainsubmenu1
    • mainsubmenu2
    • mainsubmenu3
    • mainsubmenu4

    mainsubmenu4
    • mainsubmenu5
    • mainsubmenu6
    • mainsubmenu7
    • mainsubmenu8

    So, what <pre> code should I use to "remember" the button highlights in MainMenu and MainSubMenu4? Maybe each MainSubMenu needs to set a register in its <pre>, so I can then query that register in the MainMenu <pre>?
    Code:
    g5=1
    Does each of the eight SubMenus need to set its own unique register? Or can I reuse the same register?

    And I suppose the MainMenu <pre> is something like this?
    Code:
    Mov GPRM0, 1
    if ( GPRM0 == SPRM5 ) SetHL_BTNN HL_BTNN=1
    Mov GPRM0, 2
    if ( GPRM0 == SPRM6 ) SetHL_BTNN HL_BTNN=2
    Mov GPRM0, 3
    if ( GPRM0 == SPRM7 ) SetHL_BTNN HL_BTNN=3
    ...
    Mov GPRM0, 1
    I'm an artist by training, so I'm fairly inexperienced with VM programming concepts. But I'm learning as I go! Thanks for any help.
    Quote Quote  
  2. The if ( GPRM0 == SPRM5 ) will not help you here as SPRM5 is the VTS Title Track Number, which is useful to check the last played title, but not to remember the last button in case of jumping between menus.
    Does each of the eight SubMenus need to set its own unique register?
    No, but your parent menus (MainMenu and MainSubMenu4) need an own register to remember their last used button.
    Let's use GPRM10 for the MainMenu and GPRM11 for MainSubMenu4
    GPGR5 is a 'local' variable which is loaded with the constants as the if ... SetHL_BTNN ... can only compare two registers, not a register with a consant value.
    On your MainMenu the pre command can look like this:
    Mov GPRM5, 0
    if ( GPRM10 == GPRM5 ) SetHL_BTNN HL_BTNN=1
    Mov GPRM5, 1
    if ( GPRM10 == GPRM5 ) SetHL_BTNN HL_BTNN=1
    Mov GPRM5, 2
    if ( GPRM10 == GPRM5 ) SetHL_BTNN HL_BTNN=2
    ...
    Mov GPRM0, 1

    In each submenu mainsubmenu1 to mainsubmenu4 you use a pre command which sets the register GPRM10 like Pre command for mainsubmenu3: Mov GPRM10, 3

    For MainSubMenu4 to MainSubMenu8 you can use a similar approach:
    MainSubMenu4:
    Mov GPRM10, 4 # for go back to the MainMenu!
    Mov GPRM5, 0
    if ( GPRM11 == GPRM5 ) SetHL_BTNN HL_BTNN=1
    Mov GPRM5, 1
    if ( GPRM11 == GPRM5 ) SetHL_BTNN HL_BTNN=1
    ...


    Pre command for MainSubMenu5:
    Mov GPRM11, 1
    ...
    Quote Quote  
  3. Member
    Join Date
    Feb 2008
    Location
    United States
    Search Comp PM
    Thanks for the help borax. I'll try this out Monday when I get back to work. I'm still trying to wrap my brain around the registers, I think it will help to read more about the DVD spec and how it all works.
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!